﻿<Window x:Class="Microsoft.Samples.Kinect.KinectExplorer.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:l="clr-namespace:Microsoft.Samples.Kinect.KinectExplorer"
        Icon="KinectExplorer.ico" Title="Kinect Explorer - Console"
        SizeToContent="WidthAndHeight" Top="0" Left="0"
        Loaded="WindowLoaded" Closed="WindowClosed" >
    <Window.Resources>
        <DataTemplate DataType="{x:Type l:KinectSensorItem}">
            <StackPanel>
                <Image Source="Images\KinectSensor.png" Height="100" />
                <TextBlock Text="{Binding Status}" />
            </StackPanel>
        </DataTemplate>
        <l:VisibilityConverter x:Key="VisibilityConverter" />
    </Window.Resources>
    <Grid MouseDown="GridMouseDown" Background="Transparent">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="6" />
            <ColumnDefinition Width="38" />
            <ColumnDefinition Width="356" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <StackPanel Name="insertKinectSensor" Width="400" Grid.ColumnSpan="3">
            <!-- IMPORTANT: KinectSensorChooser component in Microsoft.Samples.Kinect.WpfViewers is better to use or copy from
                 than KinectExplorers user experience for device and discovery. -->
            <Image Margin="20" Source="Images\RequiresKinectSensor.png" 
                   Width="160" HorizontalAlignment="Center" />
            <TextBlock FontSize="24" FontStyle="Italic"
                       TextWrapping="Wrap"
                       HorizontalAlignment="Center">
                Please insert a Kinect for Windows Sensor into your PC.<LineBreak/>
                <!-- Describes Kinect for Windows Sensor Setup -->
                <Hyperlink NavigateUri="http://go.microsoft.com/fwlink/?LinkID=239809"
                           RequestNavigate="ShowMoreInfo">More info.</Hyperlink>
            </TextBlock>
        </StackPanel>
        <ListBox Background="White" 
                 Padding="20" 
                 Name="kinectSensors" Visibility="{Binding ElementName=kinectSensors,Path=Items.Count, Converter={StaticResource VisibilityConverter}}" Grid.ColumnSpan="3">
        </ListBox>
        <TextBox IsEnabled="false" Grid.Row="1" MaxHeight="300"
                 Name="sensorStatusChanges" Grid.ColumnSpan="3" />
        
        <Button Name="btnOptions" Grid.Row="2" Content="Options" Grid.ColumnSpan="3" Margin="0,0,339,0" Width="61" Click="btnOptions_Click"></Button>
        <Button Content="Start capture!" Grid.Column="2" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="43,4,0,0" Name="btnStart" VerticalAlignment="Top" Width="75" Click="btnStart_Click" Visibility="{Binding ElementName=kinectSensors,Path=Items.Count, Converter={StaticResource VisibilityConverter}}"/>
        <Button Content="Images" Grid.Column="2" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="156,6,0,0" Name="btnShowImages" VerticalAlignment="Top" Width="75" Click="btnShowImages_Click" />
    </Grid>
    
    
</Window>
